<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%  
String path = request.getContextPath();  
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";  
%>  
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<script type="text/javascript" src="<%=basePath%>js/jquery.js"></script>
<script type="text/javascript" src="<%=basePath%>js/ajaxfileupload.js"></script>
<head>
<script type="text/javascript">
	$(document).ready(function(){
		 getDataList(0, null);
	})
	var rows = 10;
	var page = 1;
	var initFalg = true;
	function getDataList(currPage,jp){
		$.ajax({
			url :"page",
			type : "post",
			dateType :'json',
			data : {rows :rows,page : currPage + 1},
			contentType : 'application/x-www-form-urlencoded; charset=utf-8',
			success :function(response){
				if(response.result){
					if(response.data != null &&response.data != ""&&response.total != undefined &&response.total > 0){
						if(initFalg){
							$("#Pagination").pagination(
									response.total,{
									item_per_page : rows,
									num_edge_entries : 1,
									  num_display_entries : 8,
									  callback : getDataList//回调函数
									});
							initFlag = false;
						}
						$("#listData").html("");
						loadDataList(response.data)
					}
				}
			}
		})
	}
	function loadDataList(listdata){
		
		var html = "<tr class = 't-header'>"+
					"<td>头像</td>"+
					"<td>姓名</td>"+
					"<td>密码</td>"+
					"</tr>";
					$("#listData").append(html)
					
					
	}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
	<div class="clearbox">
            <div class="x-box">
                    <h2><a>表格</a></h2>
                    <table id="listData"></table>
            </div>
            <div id="Pagination" class="pagination"></div>
    </div>
</body>
</html>